﻿using System;
using System.Web;
using System.Data;
using System.Linq;
using System.Web.Services;
using System.Collections.Generic;

namespace WS
{
    using BLL;
    using DAL;
    using DAL.Entities;

    /// <summary>
    /// Summary description for Bussiness
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Bussiness : System.Web.Services.WebService
    {
        #region Ứng viên
        UngvienBLL _bllUngvien = new UngvienBLL();

        [WebMethod]
        public DataTable Ungvien_Select()
        {
            return _bllUngvien.Select();
        }

        [WebMethod]
        public object Ungvien_Update(Ungvien obj)
        {
            return _bllUngvien.Update(obj);
        }

        [WebMethod]
        public object Ungvien_Insert(Ungvien obj)
        {
            return _bllUngvien.Insert(obj);
        }

        [WebMethod]
        public object Ungvien_Delete(Guid id)
        {
            return _bllUngvien.Delete(id);
        }

        [WebMethod]
        public string Ungvien_Layma()
        {
            return _bllUngvien.Layma();
        }
        #endregion

        #region Chuyên môn
        ChuyenmonBLL _bllChuyenmon = new ChuyenmonBLL();

        [WebMethod]
        public DataTable Chuyenmon_Select_By_Ungvien(Guid id)
        {
            return _bllChuyenmon.Select_By_Ungvien(id);
        }

        [WebMethod]
        public object Chuyenmon_Delete(Guid id)
        {
            return _bllChuyenmon.Delete(id);
        }

        [WebMethod]
        public object Chuyenmon_Insert(Chuyenmon obj)
        {
            return _bllChuyenmon.Insert(obj);
        }

        [WebMethod]
        public object Chuyenmon_Update(Chuyenmon obj)
        {
            return _bllChuyenmon.Update(obj);
        }
        #endregion

        #region Huấn luyện
        ChuyenmonBLL _bllHuanluyen = new ChuyenmonBLL();

        [WebMethod]
        public DataTable Huanluyen_Select_By_Ungvien(Guid id)
        {
            return _bllHuanluyen.Select_By_Ungvien(id);
        }

        [WebMethod]
        public object Huanluyen_Delete(Guid id)
        {
            return _bllHuanluyen.Delete(id);
        }

        [WebMethod]
        public object Huanluyen_Insert(Huanluyen obj)
        {
            return _bllHuanluyen.Insert(obj);
        }

        [WebMethod]
        public object Huanluyen_Update(Huanluyen obj)
        {
            return _bllHuanluyen.Update(obj);
        }
        #endregion
    }
}